<?


JCAT_Package::ImportClass('JCAT_ArchiveDocument',JCAT::PACKAGE_DOC) ;;

abstract class DataVerifierDoc extends JCAT_Document implements IToolboxDataVerifierDoc
{
	
	/**
	 * what's this
	 * 
	 * @access	public
	 * @param	$sName=''	string	What's this Parameter ?
	 * @return	array
	 */
	public function DataVerifierDoc()
	{
		$this->JCAT_Document( __CLASS__ ) ;
		self::AssignGlobalID($this) ;
	}
	
		
	/**
	 * what's this
	 * 
	 * @access	public
	 * @return	bool
	 */
	public function IsEnable()
	{
		$bIsEnable = $this->Get('IsEnable') ;
		return $bIsEnable? true: false ;
	}
	
	
	/**
	 * what's this
	 * 
	 * @access	public
	 * @param 	$bEnable	bool
	 * @return	old_value
	 */
	public function SetEnable($bEnable)
	{
		return $this->Set('IsEnable',$bEnable) ;
	}
	
	
	public function GetDocumentID()
	{
		return $this->nDocumentID ;
	}
	
	protected function SetDocumentID($nID)
	{
		$this->nDocumentID = $nID ;
	}

	
	public function __wakeup()
	{
		self::AssignGlobalID($this) ;
		parent::__wakeup() ;
	}
	
	
	static public function AssignGlobalID(IToolboxDataVerifierDoc $aDoc)
	{
		self::$nDataVerifierDocID ++ ;
		
		self::$arrGlobalDocs[self::$nDataVerifierDocID] = $aDoc ;
		$aDoc->SetDocumentID(self::$nDataVerifierDocID) ;
		
		return self::$nDataVerifierDocID ;
	}

	static public function GetGlobalInsByID($nID)
	{
		return self::$arrGlobalDocs[$nID] ;
	}

	
	
	public function Load(){}
	public function Save(){}
	public function Create(){}
	public function Delete(){}
	public function IsExists($bRequery=false){return true;}
	
	
	// 属性 ///////////////////////////////////////////////////////////////////////////////

	private $nDocumentID ;
	
	static private $arrGlobalDocs = array() ;
	
	static private $nDataVerifierDocID = 0 ;
}
?>